package com.rgp.servicedriveruser.controller;

import com.rgp.internalcommon.dto.DriverUserWorkStatusDto;
import com.rgp.internalcommon.dto.ResponseResult;
import com.rgp.internalcommon.response.DriverStatusResponse;
import com.rgp.servicedriveruser.service.DriverUserWorkStatusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
 * @author nhp
 * @version 1.0
 * @description TODO
 * @date 2024-04-17 22:23
 */
@RestController
public class DriverUserWorkStatusController {

    @Autowired
    private DriverUserWorkStatusService driverUserWorkStatusService;

    @PostMapping("/driver-user-work-status")
    public ResponseResult changeStatus(@RequestBody DriverUserWorkStatusDto driverUserWorkStatusDto){
        return driverUserWorkStatusService.changeStatus(driverUserWorkStatusDto);
    }

    @PostMapping("/get-driver-status/by-ids")
    public ResponseResult<DriverStatusResponse> getStatusByDriverIds(@RequestBody List<Long> driverIds){
        return driverUserWorkStatusService.getStatusByDriverIds(driverIds);
    }
}